package tests;

import org.junit.Test;

import coreSimulation.Baggage;
import coreSimulation.DropOffDesk;
import coreSimulation.Passenger;
import coreSimulation.PassengerList;
import coreSimulation.Queue;
import exceptions.DuplicatePassengerException;

public class DropOffDeskTest {
	
	@Test
	public void testProcessQueue(){
		PassengerList passengerList = new PassengerList();
		
		Queue queue = new Queue();
		
		DropOffDesk desk = new DropOffDesk();
		
		Baggage bag1 = new Baggage(10, 20, 50, 10);
		Passenger p1 = new Passenger("Passenger One", "SA-12345678");
		p1.addBaggage(bag1);
		
		Baggage bag2 = new Baggage(60, 100, 50, 10);
		Passenger p2 = new Passenger("Passenger Two", "SA-23456789");
		p2.addBaggage(bag2);
		

		

		
		try {
			queue.add(p1);
		} catch (DuplicatePassengerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		try {
			queue.add(p2);
		} catch (DuplicatePassengerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		desk.processQueue(queue, passengerList);
		
		System.out.println("##" + passengerList.getReport());
		
		
	}

}
